<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-Type" content="text/html;charset=UTF-8" />
	<title>评价订单 - {$site_name}</title>
	<meta name="keywords" content="{$site_seo_keywords}" />
	<meta name="description" content="{$site_seo_description}">
	<tc_include file="Public:head" />	
	<link href="__PUBLIC__/js/artDialog/skins/default.css" rel="stylesheet" />
	<script type="text/html" id="photos-item-wrapper">
	<li id="savedimage{id}" class="t-pic">
		<input id="photo-{id}" type="hidden" name="photos_url[]" value="{filepath}"> 		
		<img id="photo-{id}-preview" src="{url}" style="height:48px;width: 48px;" onclick="parent.image_preview_dialog(this.src);">
		<div class="re-pic">
		<a href="javascript:upload_one_image('图片上传','#photo-{id}');"><i class="fa fa-pencil"></i></a>
		<a class="remove-p" href="javascript:(function(){$('#savedimage{id}').remove();})();"><i class="fa fa-close"></i></a>
		</div>
	</li>
	</script>
	<script type="text/javascript" src="__PUBLIC__/js/raty/jquery.raty.min.js"></script>
</head>
<body class="body-white" id="top">
	<!---头部开始--->
	<tc_include file="Public:header"/>
	<!---头部结束--->
<style type="text/css">
	.on-sub{
		position:relative;
	}
	.tips_error{
		position:absolute;
		right:240px;
		top:10px;
		color:#d4282d;
	}
</style>
		<div class="k-row user-center-main">
                <div class="row">
                    <div class="c-left fl">
	                    <tc_include file="Public:usernav"/>
                    </div>
                    <div class="c-right fr">
                           <div class="tabs">
                               <ul class="nav nav-tabs">
                                   <li class="active"><a href="#" data-toggle="tab">评价订单</a></li>
                               </ul>
							   <div class="clear"></div>
                               <div class="tab-content">
                                   <div class="tab-pane active" >
                                   		<form class="form-horizontal js-ajax-form" action="{:U('Comment/GoodsComment/post_comment')}" method="post">
											
											<input type="hidden" value="{$order.order_id}" name="order_id" />
											<div class="comment-hd">
												<p>订单号：<span>{$order.order_sn}</span>{$order.add_time|date="Y-m-d H:i:s",###}</p>
											</div>
																					
											
                                   			<div class="c-ct">
												<div class="left fl">
													<div class="pic"><a href="{:U('Goods/article/index',array('g_id'=>$goods_order['goods_id']))}" target="_blank" title="{$goods_order.goods_name}"><img src="{:sp_get_asset_upload_path($goods_order['goods_img'])}" alt="{$goods_order.goods_name}" /></a></div>
													<div class="name"><a href="{:U('Goods/article/index',array('g_id'=>$goods_order['goods_id']))}" target="_blank" title="{$goods_order.goods_name}">{$goods_order.goods_name}</a></div>
													<div class="price"><span class="xh">￥{$goods_order.goods_price}</span></div>													
												</div>
												
												<input type="hidden" name="goods_id" value="{$goods_order.goods_id}" />
												<div class="right fl">
													<div class="raty">
														<div class="fl" style="width:80px;">商品满意度</div>														
														<div id="score" class="fl"></div>
														<div id="hint" class="hint fl"></div><span class="fl">分</span>
													</div>
													 <div class="clear"></div>
													<div class="content">
														<label for="content" class="fl">评价</label>
														<textarea name="content" class="fl" id="content" placeholder="快分享你的购买心得吧"></textarea>
													</div>
													<div class="clear"></div>
													<div class="imgs">
														<ul id="photos" class="pic-list unstyled fl"></ul>
														<a href="javascript:upload_multi_image_one('图片上传','#photos','photos-item-wrapper');" class="u-btn fl"><i class="fa fa-photo"></i></a>
													</div>
													<span class="pic-count">共<span class="xh">0</span>张，还能上传<span class="xh">5</span>张</span>
												</div>
												
												 <div class="clear"></div>												 
											</div>
										
											<div class="on-sub">
												<button type="submit" class="btn btn-on js-ajax-submit">提交评价</button>
											</div>
                                   		</form>
                                   </div>
                               </div>							
                           </div>
                    </div>
                </div>
		
	</div>
	<!-- /container -->
	<tc_include file="Public:footer" />
	<tc_include file="Public:scripts" />
	<script type="text/javascript">
			$(document).ready(function(){
				$('.imgs').on('mouseover','.t-pic',function(){
					$(this).find('.re-pic').css('display','block');
				})
				$('.imgs').on('mouseout','.t-pic',function(){
					$(this).find('.re-pic').css('display','none');
				})
			})
	</script>
	<script type="text/javascript">		
		$(".body-white").on('click','.aui_state_highlight',function(){
			var _count = $("#photos li").length;
			$('.pic-count span').eq(0).text(_count);
			$('.pic-count span').eq(1).text(5-_count);
			if(_count > 4){
				$('.u-btn').remove();
			}			
		});
		
		
	</script>
	<script type="text/javascript">
		$("#photos").on('click','.remove-p',function(){
			var _count = $("#photos li").length-1;
			$('.pic-count span').eq(0).text(_count);
			$('.pic-count span').eq(1).text(5-_count);
			if(_count == 4){
				var _html = "<a href=" + "javascript:upload_multi_image_one('图片上传','#photos','photos-item-wrapper');" + " class='u-btn fl'><i class='fa fa-photo'></i></a>";
				$('.imgs').append(_html);
			}
		});
	</script>
	<script type="text/javascript">
		$(function() {
			$.fn.raty.defaults.path = '__PUBLIC__/images';			
			    $('#score').raty({
				target    : '#hint',
				targetText: '0',
				targetType: 'number',
				targetKeep: true
			});

		});
	</script>
</body>
</html>